<template>
	<div>
		<h1>列表页</h1>
		<div v-for="n in 10" :key="n">
			<!-- <RouterLink :to="`/detail/${n}`"> id:{{ n }} </RouterLink> -->
      <span @click="toDetail(n)" class="link">id:{{ n }}</span>
		</div>
	</div>
</template>
<script>
  export default {
    methods:{
      toDetail(n){
        this.$router.push(`detail/${n}`)
      }
    }
  }
</script>
<style scoped>
  .link{
    color: tomato;
    font-size: 30px;
    cursor: pointer;
  }
  .link:hover{
    color: brown;
  }
</style>
